﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace IndustrialCommunication.Core.Interface
{
    public interface IChannel<TPackageInfo>
    {
        void Send(byte[] data);
        Task SendSync(byte[] data);
        Task SendAsync(TPackageInfo package,IPackageEncoder<TPackageInfo> encoder);
        void Close();
        Task CloseAsync();
        bool IsClosed {  get; }
        DateTimeOffset LastActiveTime {  get; }
    }
}
